package com.tanhua.dubbo.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.domain.db.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


public interface UserInfoMapper extends BaseMapper<UserInfo> {


    @Select(value = "SELECT u.* FROM  tb_user_info u, tb_black_list bl WHERE u.id=bl.black_user_id AND bl.user_id=#{userId} ORDER BY bl.created DESC")
    IPage<UserInfo> selectUserPage(Page<UserInfo> page, @Param("userId") Long userId);

}
